<?php


namespace app\admin\validate;


use think\Validate;

class Category extends Validate
{
    protected $rule = [
        'pid' => 'require',
        'name' => 'require',
        'id' => 'require',
        'listorder' => 'require',
        'status' => 'require'
    ];

    protected $message = [
        'pid' => '父类ID必须',
        'name' => '分类名字必须',
        'id' => 'ID必须',
        'listorder' => '排序编号必须',
        'status' => '状态码必须'
    ];

    protected $scene = [
        'save' => ['pid,name'],
        'listorder' => ['id','listorder'],
        'status' => ['id','status']
    ];
}